using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Play_Animation : MonoBehaviour
{
    SPUM_Prefabs ani;
    void Start()
    {
        ani = transform.GetComponent<SPUM_Prefabs>();
        ani.OverrideControllerInit();
    }
    public void Idle()
    {
        ani.PlayAnimation(PlayerState.IDLE, 0);
    }
    public void Move()
    {
        ani.PlayAnimation(PlayerState.MOVE, 0);
    }
    public void Attack(int index)
    {
        ani.PlayAnimation(PlayerState.ATTACK, index);
    }
    public void Death()
    {
        ani.PlayAnimation(PlayerState.DEATH, 0);
    }
    void Update()
    {
        //if (Input.GetKeyDown(KeyCode.J))
        //{
        //    ani.PlayAnimation(PlayerState.ATTACK, 0);
        //}
    }
}
